package com.dotflat.staffExtend.domain;

import com.dotflat.rest.domain.AreableObjectBase;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/7/13
 * *******************************
 */
@Entity
@Data
@Table(name = "ex_staff_extend_vaccine" )
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class StaffExtendVaccine extends AreableObjectBase {

    @Column(columnDefinition = "varchar(32)  COMMENT '扩展记录id'")
    private String extendInfoId;

    @ManyToOne
    @JoinColumn(name = "extendInfoId", columnDefinition = "varchar(32) COMMENT '扩展记录id'", insertable = false, updatable = false)
    @JsonIgnore
    private StaffExtendInfo staffExtendInfo;

    @Column(columnDefinition = "datetime default NOW() COMMENT '体检时间'", nullable = false)
    private Date eventTime = new Date();

    @Column(columnDefinition = "varchar(512) COMMENT '图片地址'")
    private String name;
}
